package com.zaoniao.enstudy.infrastructure.convert;

import com.zaoniao.enstudy.domain.entity.ZaoWord;
import com.zaoniao.enstudy.domain.entity.bo.ZaoWordBo;
import com.zaoniao.enstudy.infracore.web.PagedGridResult;
import com.zaoniao.enstudy.infrastructure.po.ZaoWordPo;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author llb
 */
@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface ZaoWordCrt {

    ZaoWordCrt INSTANCE = Mappers.getMapper(ZaoWordCrt.class);

    /**
     * boList转doList
     * @param zaoWordBoList -
     * @return -
     */
    List<ZaoWord> bo2doList(List<ZaoWordBo> zaoWordBoList);

    /**
     * doList转poList
     * @param zaoWordList -
     * @return -
     */
    List<ZaoWordPo> do2poList(List<ZaoWord> zaoWordList);

    PagedGridResult<ZaoWord> bo2doPage(PagedGridResult<ZaoWordBo> pages);

    ZaoWord po2do(ZaoWordPo zaoWordPo);

    List<ZaoWord> po2doList(List<ZaoWordPo> zaoWordPos);
}
